emitAwait

abstract suspend fun emitAwait(event: String, vararg payloads: Any?)

Suspends until the event is accepted into the outbound queue (WorkQueue → engine write buffer). Completes when enqueue succeeds; does not await transport drain.

Throws only on pre-queue rejection (e.g. reserved event names, payload encoding errors). Async transport SocketError.SendFailed after enqueue is reported on errors only — it does not fail a prior emitAwait that already returned.


abstract suspend fun emitAwait(command: StreamCommand)

Same queue semantics as emitAwait for a StreamCommand.